import request from "../../http";

const orderApi = {
    getMyOrderInfo(data) {
        return request ({
            url: '/api/order/list',
            method: 'get',
            params: data
        })
        
    },
    cancelOrderItem (data) {
        return request ({
            url: '/api/order/cancelOrder',
            method: 'post',
            data
        })
    },
    // 订单详情
    getOrderDetail(data) {
        return request ({
            url: '/api/order/'+data.orderId,
            method: 'get',
            params: data
        })
    },
    // 修改订单状态
    changeOrderStatus(data) {
        return request ({
            url: '/api/order/changeStatus',
            method: 'post',
            data
        })

    },

    // 用户退款 同意或者拒绝
    changeRefundStatus(data){
        return request({
            url: '/api/order/changeRefundStatus',
            method: 'post',
            data
        })
    },


    // 动态表单提交资料
    submitProcessInfo(data){
        return request ({
            url: '/api/customControl/app2',
            method: 'post',
            data
        })
    },

    // 唤起支付
    payMentInfo (data) {
        return request ({
            url: '/api/order/evokeOrder',
            method: 'post',
            data
        })
    },

    // 轮询监听
    checkIsPayInfo(data) {
        return request ({
            url: '/pc/orders/checkPay/'+ data.orderId,
            method: 'get',
            params: data

        })
    }
    



   
}

export default orderApi;